Arm backend: Add Arm Neural Statistics#20662
Conversation
Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com> Change-Id: I22fe47daf097b0c93544860c60782677b35fcff2
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20662
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 6 Pending, 1 Unrelated FailureAs of commit 074047e with merge base a6d812a ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@claude Review this PR. |
|
Claude finished @digantdesai's task in 4m 23s —— View job PR Review: Arm backend — Add Arm Neural StatisticsI reviewed the runtime C++ ( Overall this is a well-structured, genuinely opt-in feature. The lifetime handling of the metadata string is correct ( A few things worth addressing before merge: 1. Does actually capturing statistics require a session-creation flag? (main question)In 2. Statistics bind-point memory is allocated even when the feature is disabledThe env var ( 3. Redundant
|
| from executorch.devtools.inspector import Inspector | ||
|
|
||
| inspector = Inspector(etdump_path="run.etdump") | ||
| records = inspector.get_vgf_neural_statistics() |
There was a problem hiding this comment.
do we have similar tests in CI for the Inspector?
digantdesai
left a comment
There was a problem hiding this comment.
Looks good. Stamping to unblock you. @Gasoonjia do you want to take a look as well?
This PR adds opt-in VGF Arm Neural Accelerator Statistics collection for ETDump.
When EXECUTORCH_VGF_ENABLE_NEURAL_STATISTICS=1 is set, the VGF backend collects VK_ARM_data_graph neural statistics metadata, wraps the opaque binary blobs in a versioned JSON payload, and attaches it to ETDump delegate metadata under the VGF_NEURAL_STATISTICS event. The implementation keeps normal timing-only profiling unchanged by default, handles unsupported Vulkan/API/bind-point paths gracefully, and adds Inspector parsing support to recover decoded debug_database, statistics_info, and statistics_memory bytes.
This option EXECUTORCH_VGF_ENABLE_NEURAL_STATISTICS was added to attach this payload only when it is requested specifically, otherwise it could blow up ETDump in some runs.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani